package org.wang.web.action;

import org.wang.web.service.MyService;

public class MyAction {

	private MyService service;
	
	private String info;
	
	public String execute(){
		System.out.println("Action default");
		setInfo("SUCCESS");
		return "SUCCESS";
	}
	
	public String create(){
		System.out.println("Action create Name:"+service.getName());
		setInfo("CREATE");
		return "CREATE";
	}
	
	public String update(){
		System.out.println("Action update");
		setInfo("UPDATE");
		return "UPDATE";
	}
	
	public String delete(){
		System.out.println("Action delete");
		setInfo("DELETE");
		return "DELETE";
	}

	public MyService getService() {
		return service;
	}

	public void setService(MyService service) {
		this.service = service;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}
	
}
